package top.lemcoo.exam.modules.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import top.lemcoo.exam.modules.system.domain.dto.UserListDTO;
import top.lemcoo.exam.modules.system.domain.SysUser;

/**
 * @author zhaowx
 * @date 2021/6/24 0024 10:25
 * @desc
 */
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {

    /**
     * 根据用户名查询用户
     *
     * @param username 用户名
     * @return {@link SysUser}
     */
    SysUser selectUser(String username);

    /**
     * 分页查询用户列表
     *
     * @param page 页面
     * @param dto  dto
     * @return {@link IPage<SysUser>}
     */
    IPage<SysUser> selectUserList(Page<?> page, @Param("param") UserListDTO dto);
}
